package com.lenovo.smarttraffic.bean;

import android.app.Service;
import android.os.Parcel;
import android.os.Parcelable;

import org.litepal.crud.LitePalSupport;

import java.io.Serializable;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;

/**
 * Created by Caleb.F
 * on 2020-06-29
 * at 15:08
 *
 * @author Caleb.F
 * @Description
 */
public  class EnvironmentBean extends LitePalSupport implements Parcelable {

    private Integer tem;
    private Integer hum;
    private  Integer pm;
    private  Integer co;
    private  Integer light;
    private Integer roadStatus;
    private  String currentTime;

    public EnvironmentBean(Integer tem, Integer hum, Integer pm, Integer co, Integer light, Integer roadStatus) {
        this.tem = tem;
        this.hum = hum;
        this.pm = pm;
        this.co = co;
        this.light = light;
        this.roadStatus = roadStatus;
    }

    public EnvironmentBean(Integer tem, Integer hum, Integer pm, Integer co, Integer light, Integer roadStatus, String currentTime) {
        this.tem = tem;
        this.hum = hum;
        this.pm = pm;
        this.co = co;
        this.light = light;
        this.roadStatus = roadStatus;
        this.currentTime = currentTime;
    }

    public Integer getTem() {
        return tem;
    }

    public void setTem(Integer tem) {
        this.tem = tem;
    }

    public Integer getHum() {
        return hum;
    }

    public void setHum(Integer hum) {
        this.hum = hum;
    }

    public Integer getPm() {
        return pm;
    }

    public void setPm(Integer pm) {
        this.pm = pm;
    }

    public Integer getCo() {
        return co;
    }

    public void setCo(Integer co) {
        this.co = co;
    }

    public Integer getLight() {
        return light;
    }

    public void setLight(Integer light) {
        this.light = light;
    }

    public Integer getRoadStatus() {
        return roadStatus;
    }

    public void setRoadStatus(Integer roadStatus) {
        this.roadStatus = roadStatus;
    }

    public String getCurrentTime() {
        return currentTime;
    }

    public void setCurrentTime(String currentTime) {
        this.currentTime = currentTime;
    }

    @Override
    public String toString() {
        return "EnvironmentBean{" +
                "tem=" + tem +
                ", hum=" + hum +
                ", pm=" + pm +
                ", co=" + co +
                ", light=" + light +
                ", roadStatus=" + roadStatus +
                ", currentTime='" + currentTime + '\'' +
                '}';
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeValue(this.tem);
        dest.writeValue(this.hum);
        dest.writeValue(this.pm);
        dest.writeValue(this.co);
        dest.writeValue(this.light);
        dest.writeValue(this.roadStatus);
        dest.writeString(this.currentTime);
    }

    protected EnvironmentBean(Parcel in) {
        this.tem = (Integer) in.readValue(Integer.class.getClassLoader());
        this.hum = (Integer) in.readValue(Integer.class.getClassLoader());
        this.pm = (Integer) in.readValue(Integer.class.getClassLoader());
        this.co = (Integer) in.readValue(Integer.class.getClassLoader());
        this.light = (Integer) in.readValue(Integer.class.getClassLoader());
        this.roadStatus = (Integer) in.readValue(Integer.class.getClassLoader());
        this.currentTime = in.readString();
    }

    public static final Creator<EnvironmentBean> CREATOR = new Creator<EnvironmentBean>() {
        @Override
        public EnvironmentBean createFromParcel(Parcel source) {
            return new EnvironmentBean(source);
        }

        @Override
        public EnvironmentBean[] newArray(int size) {
            return new EnvironmentBean[size];
        }
    };
}
